Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

2.0.1 map enhancements #477

Merged
merged 17 commits into from
Jan 22, 2025
Merged

2.0.1 map enhancements #477

merged 17 commits into from
Jan 22, 2025

Conversation

krugazul
Copy link
Collaborator

@krugazul krugazul commented Jan 22, 2025

Requirements

Add in a map block which covers the following conditions. I took a look at using a variation of another plugins block, but it proved to tricky.

  • Destinations Archive - Showing pins of all countries
  • Country - Showing pins of the sub regions.
  • Region - Showing Pins of all the accommodation in the region.
  • Accommodation - Shows the pin of the accommodations location.
  • Tour - Displays the tour map generated from the itinerary.
  • Map Marker needs to display title, description and excerpt.

Additional Changes

  • Removed the need for the "map placeholder" settings as that is now controlled in the block itself.
  • Map the map.js load conditionally if the block has been used in the page.
  • Removed Unused icons and placeholders from previous versions.

Designs

Placeholder Showing before click.
Screenshot 2025-01-22 at 10 17 08

Single Country
Screenshot 2025-01-22 at 09 17 26
Screenshot 2025-01-22 at 10 18 21

Single Region
Screenshot 2025-01-22 at 11 56 10

Destination Archive
Screenshot 2025-01-22 at 10 17 17

Single Accommodation
Screenshot 2025-01-22 at 11 54 58

Single Tour
Screenshot 2025-01-22 at 12 06 45

Map Default Marker being changed.
Screenshot 2025-01-22 at 12 31 53

@krugazul krugazul added the [Type] Enhancement A suggestion for improvement label Jan 22, 2025
@krugazul krugazul added this to the 2.1.0 milestone Jan 22, 2025
@krugazul krugazul requested a review from ZaredRogers January 22, 2025 09:56
@krugazul krugazul self-assigned this Jan 22, 2025
Copy link

github-actions bot commented Jan 22, 2025

Image description CodeRabbit


Uplevel your code reviews with CodeRabbit Pro

CodeRabbit Pro

If you like this project, please support us by purchasing the Pro version. The Pro version has advanced context, superior noise reduction and several proprietary improvements compared to the open source version. Moreover, CodeRabbit Pro is free for open source projects.

Copy link

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Image description CodeRabbit

Commits Files that changed from the base of the PR and between 4a4d4ea and 8bae7c9 commits.
Files selected (13)
  • assets/css/scss/_maps.scss (1)
  • assets/css/style.css (1)
  • assets/css/style.scss (1)
  • assets/js/blocks/general.js (2)
  • assets/js/blocks/maps.js (1)
  • assets/js/src/maps.js (8)
  • includes/classes/blocks/class-bindings.php (1)
  • includes/classes/blocks/class-registration.php (2)
  • includes/classes/legacy/class-frontend.php (4)
  • includes/classes/legacy/class-maps.php (10)
  • includes/classes/legacy/class-tour-operator.php (1)
  • includes/constants/settings-fields.php (2)
  • includes/template-tags/maps.php (8)
Files ignored due to filter (69)
  • assets/img/Typecalendar-icon.png
  • assets/img/Typetours-icon.png
  • assets/img/accommodation-type-TO-icon-black-20px.png
  • assets/img/accommodation.png
  • assets/img/activities.png
  • assets/img/best-months-to-travel-TO-icon-black-20px.png
  • assets/img/blocks/placeholder-map-1920x656.jpg
  • assets/img/dates-travelled-icon-black-20px.png
  • assets/img/duration-icon-black-20px.png
  • assets/img/from-price-TO-icon-black-20px.png
  • assets/img/left-arrow-new.svg
  • assets/img/map-TO-icon-black-20px.png
  • assets/img/mystery-man-square.png
  • assets/img/mystery-man-wide.png
  • assets/img/offers.png
  • assets/img/placeholders/placeholder-accommodation-1920x600.jpg
  • assets/img/placeholders/placeholder-accommodation-350x350.jpg
  • assets/img/placeholders/placeholder-accommodation-360x168.jpg
  • assets/img/placeholders/placeholder-accommodation-750x350.jpg
  • assets/img/placeholders/placeholder-activity-1920x600.jpg
  • assets/img/placeholders/placeholder-activity-350x350.jpg
  • assets/img/placeholders/placeholder-activity-360x168.jpg
  • assets/img/placeholders/placeholder-activity-750x350.jpg
  • assets/img/placeholders/placeholder-banner-1920x600.jpg
  • assets/img/placeholders/placeholder-destination-1920x600.jpg
  • assets/img/placeholders/placeholder-destination-350x350.jpg
  • assets/img/placeholders/placeholder-destination-360x168.jpg
  • assets/img/placeholders/placeholder-destination-750x350.jpg
  • assets/img/placeholders/placeholder-destination-general.jpg
  • assets/img/placeholders/placeholder-general-1920x600.jpg
  • assets/img/placeholders/placeholder-general-350x350.jpg
  • assets/img/placeholders/placeholder-general-360x168.jpg
  • assets/img/placeholders/placeholder-general-750x350.jpg
  • assets/img/placeholders/placeholder-map-1170x400.jpg
  • assets/img/placeholders/placeholder-map-350x350.jpg
  • assets/img/placeholders/placeholder-map-400x400.jpg
  • assets/img/placeholders/placeholder-page-350x350.jpg
  • assets/img/placeholders/placeholder-page-360x168.jpg
  • assets/img/placeholders/placeholder-page-750x350.jpg
  • assets/img/placeholders/placeholder-page-general.jpg
  • assets/img/placeholders/placeholder-post-1920x600.jpg
  • assets/img/placeholders/placeholder-post-350x350.jpg
  • assets/img/placeholders/placeholder-post-360x168.jpg
  • assets/img/placeholders/placeholder-post-750x350.jpg
  • assets/img/placeholders/placeholder-review-1920x600.jpg
  • assets/img/placeholders/placeholder-review-350x350.jpg
  • assets/img/placeholders/placeholder-review-360x168.jpg
  • assets/img/placeholders/placeholder-review-750x350.jpg
  • assets/img/placeholders/placeholder-special-1920x600.jpg
  • assets/img/placeholders/placeholder-special-350x350.jpg
  • assets/img/placeholders/placeholder-special-360x168.jpg
  • assets/img/placeholders/placeholder-special-750x350.jpg
  • assets/img/placeholders/placeholder-team-1920x600.jpg
  • assets/img/placeholders/placeholder-team-350x350.jpg
  • assets/img/placeholders/placeholder-team-360x168.jpg
  • assets/img/placeholders/placeholder-team-750x350.jpg
  • assets/img/placeholders/placeholder-tour-1920x600.jpg
  • assets/img/placeholders/placeholder-tour-350x350.jpg
  • assets/img/placeholders/placeholder-tour-360x168.jpg
  • assets/img/placeholders/placeholder-tour-750x350.jpg
  • assets/img/placeholders/placeholder-vehicle-1920x600.jpg
  • assets/img/placeholders/placeholder-vehicle-350x350.jpg
  • assets/img/placeholders/placeholder-vehicle-360x168.jpg
  • assets/img/placeholders/placeholder-vehicle-750x350.jpg
  • assets/img/placeholders/placeholder-video-1920x600.jpg
  • assets/img/placeholders/placeholder-video-350x350.jpg
  • assets/img/placeholders/placeholder-video-360x168.jpg
  • assets/img/placeholders/placeholder-video-750x350.jpg
  • assets/img/restaurants.png
Files not summarized due to errors (13)
  • assets/js/blocks/general.js (nothing obtained from openai)
  • assets/css/style.css (nothing obtained from openai)
  • assets/css/style.scss (nothing obtained from openai)
  • assets/js/src/maps.js (nothing obtained from openai)
  • includes/classes/legacy/class-maps.php (diff tokens exceeds limit)
  • assets/css/scss/_maps.scss (nothing obtained from openai)
  • assets/js/blocks/maps.js (nothing obtained from openai)
  • includes/classes/blocks/class-bindings.php (nothing obtained from openai)
  • includes/classes/legacy/class-frontend.php (nothing obtained from openai)
  • includes/classes/blocks/class-registration.php (nothing obtained from openai)
  • includes/constants/settings-fields.php (nothing obtained from openai)
  • includes/template-tags/maps.php (nothing obtained from openai)
  • includes/classes/legacy/class-tour-operator.php (nothing obtained from openai)
Files not reviewed due to errors (13)
  • assets/css/scss/_maps.scss (no response)
  • assets/css/style.css (no response)
  • assets/js/blocks/maps.js (no response)
  • assets/css/style.scss (no response)
  • assets/js/blocks/general.js (no response)
  • assets/js/src/maps.js (no response)
  • includes/classes/blocks/class-registration.php (no response)
  • includes/classes/legacy/class-frontend.php (no response)
  • includes/constants/settings-fields.php (no response)
  • includes/classes/legacy/class-maps.php (no response)
  • includes/classes/blocks/class-bindings.php (no response)
  • includes/classes/legacy/class-tour-operator.php (no response)
  • includes/template-tags/maps.php (no response)
Review comments generated (0)
  • Review: 0
  • LGTM: 0

Tips

Chat with Image description CodeRabbit Bot (@coderabbitai)

  • Reply on review comments left by this bot to ask follow-up questions. A review comment is a comment on a diff or a file.
  • Invite the bot into a review comment chain by tagging @coderabbitai in a reply.

Code suggestions

  • The bot may make code suggestions, but please review them carefully before committing since the line number ranges may be misaligned.
  • You can edit the comment made by the bot and manually tweak the suggestion if it is slightly off.

Pausing incremental reviews

  • Add @coderabbitai: ignore anywhere in the PR description to pause further reviews from the bot.

Copy link

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Image description CodeRabbit

Commits Files that changed from the base of the PR and between 8bae7c9 and 9813719 commits.
Files selected (7)
  • assets/js/src/maps.js (9)
  • changelog.md (1)
  • includes/classes/blocks/class-registration.php (3)
  • includes/classes/legacy/class-maps.php (1)
  • includes/classes/legacy/class-tour-operator.php (2)
  • includes/template-tags/general.php (1)
  • includes/template-tags/maps.php (9)
Files not summarized due to errors (7)
  • includes/classes/legacy/class-maps.php (diff tokens exceeds limit)
  • includes/template-tags/maps.php (diff tokens exceeds limit)
  • changelog.md (nothing obtained from openai)
  • assets/js/src/maps.js (nothing obtained from openai)
  • includes/classes/blocks/class-registration.php (nothing obtained from openai)
  • includes/template-tags/general.php (nothing obtained from openai)
  • includes/classes/legacy/class-tour-operator.php (nothing obtained from openai)
Files not reviewed due to errors (6)
  • assets/js/src/maps.js (no response)
  • includes/template-tags/general.php (no response)
  • includes/classes/legacy/class-tour-operator.php (no response)
  • changelog.md (no response)
  • includes/template-tags/maps.php (no response)
  • includes/classes/blocks/class-registration.php (no response)
Files skipped from review due to trivial changes (1)
  • includes/classes/legacy/class-maps.php (diff too large)
Review comments generated (0)
  • Review: 0
  • LGTM: 0

Tips

Chat with Image description CodeRabbit Bot (@coderabbitai)

  • Reply on review comments left by this bot to ask follow-up questions. A review comment is a comment on a diff or a file.
  • Invite the bot into a review comment chain by tagging @coderabbitai in a reply.

Code suggestions

  • The bot may make code suggestions, but please review them carefully before committing since the line number ranges may be misaligned.
  • You can edit the comment made by the bot and manually tweak the suggestion if it is slightly off.

Pausing incremental reviews

  • Add @coderabbitai: ignore anywhere in the PR description to pause further reviews from the bot.

@krugazul krugazul marked this pull request as ready for review January 22, 2025 10:33
Copy link

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Image description CodeRabbit

Commits Files that changed from the base of the PR and between 9813719 and 9625f20 commits.
Files selected (1)
  • includes/classes/legacy/class-tour-operator.php (2)
Files not summarized due to errors (1)
  • includes/classes/legacy/class-tour-operator.php (nothing obtained from openai)
Files not reviewed due to errors (1)
  • includes/classes/legacy/class-tour-operator.php (no response)
Review comments generated (0)
  • Review: 0
  • LGTM: 0

Tips

Chat with Image description CodeRabbit Bot (@coderabbitai)

  • Reply on review comments left by this bot to ask follow-up questions. A review comment is a comment on a diff or a file.
  • Invite the bot into a review comment chain by tagging @coderabbitai in a reply.

Code suggestions

  • The bot may make code suggestions, but please review them carefully before committing since the line number ranges may be misaligned.
  • You can edit the comment made by the bot and manually tweak the suggestion if it is slightly off.

Pausing incremental reviews

  • Add @coderabbitai: ignore anywhere in the PR description to pause further reviews from the bot.

@Justinabes007
Copy link
Contributor

I have reviewed the pull request - "2.0.1 map enhancements" for the LSX Tour Operator plugin.
Downloaded and tested locally.

This update introduces several improvements and fixes related to map functionalities.

Key Enhancements:

  • Map Display: Improved rendering of maps across various sections, ensuring consistent and accurate geographical representations.
  • Interactive Features: Enhanced interactivity, allowing users to engage more effectively with map elements.
  • Performance Optimizations: Optimized loading times for maps, contributing to a smoother user experience.

@Justinabes007 Justinabes007 reopened this Jan 22, 2025
@Justinabes007 Justinabes007 merged commit ccfea8e into 2.0.1-update Jan 22, 2025
6 of 8 checks passed
@Justinabes007 Justinabes007 deleted the 2.0.1-map-enhancements branch January 22, 2025 11:19
Copy link

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Image description CodeRabbit

Commits Files that changed from the base of the PR and between 4a4d4ea and 9625f20 commits.
Files selected (15)
  • assets/css/scss/_maps.scss (1)
  • assets/css/style.css (1)
  • assets/css/style.scss (1)
  • assets/js/blocks/general.js (2)
  • assets/js/blocks/maps.js (1)
  • assets/js/src/maps.js (9)
  • changelog.md (1)
  • includes/classes/blocks/class-bindings.php (1)
  • includes/classes/blocks/class-registration.php (3)
  • includes/classes/legacy/class-frontend.php (4)
  • includes/classes/legacy/class-maps.php (1)
  • includes/classes/legacy/class-tour-operator.php (2)
  • includes/constants/settings-fields.php (2)
  • includes/template-tags/general.php (1)
  • includes/template-tags/maps.php (9)
Files ignored due to filter (69)
  • assets/img/Typecalendar-icon.png
  • assets/img/Typetours-icon.png
  • assets/img/accommodation-type-TO-icon-black-20px.png
  • assets/img/accommodation.png
  • assets/img/activities.png
  • assets/img/best-months-to-travel-TO-icon-black-20px.png
  • assets/img/blocks/placeholder-map-1920x656.jpg
  • assets/img/dates-travelled-icon-black-20px.png
  • assets/img/duration-icon-black-20px.png
  • assets/img/from-price-TO-icon-black-20px.png
  • assets/img/left-arrow-new.svg
  • assets/img/map-TO-icon-black-20px.png
  • assets/img/mystery-man-square.png
  • assets/img/mystery-man-wide.png
  • assets/img/offers.png
  • assets/img/placeholders/placeholder-accommodation-1920x600.jpg
  • assets/img/placeholders/placeholder-accommodation-350x350.jpg
  • assets/img/placeholders/placeholder-accommodation-360x168.jpg
  • assets/img/placeholders/placeholder-accommodation-750x350.jpg
  • assets/img/placeholders/placeholder-activity-1920x600.jpg
  • assets/img/placeholders/placeholder-activity-350x350.jpg
  • assets/img/placeholders/placeholder-activity-360x168.jpg
  • assets/img/placeholders/placeholder-activity-750x350.jpg
  • assets/img/placeholders/placeholder-banner-1920x600.jpg
  • assets/img/placeholders/placeholder-destination-1920x600.jpg
  • assets/img/placeholders/placeholder-destination-350x350.jpg
  • assets/img/placeholders/placeholder-destination-360x168.jpg
  • assets/img/placeholders/placeholder-destination-750x350.jpg
  • assets/img/placeholders/placeholder-destination-general.jpg
  • assets/img/placeholders/placeholder-general-1920x600.jpg
  • assets/img/placeholders/placeholder-general-350x350.jpg
  • assets/img/placeholders/placeholder-general-360x168.jpg
  • assets/img/placeholders/placeholder-general-750x350.jpg
  • assets/img/placeholders/placeholder-map-1170x400.jpg
  • assets/img/placeholders/placeholder-map-350x350.jpg
  • assets/img/placeholders/placeholder-map-400x400.jpg
  • assets/img/placeholders/placeholder-page-350x350.jpg
  • assets/img/placeholders/placeholder-page-360x168.jpg
  • assets/img/placeholders/placeholder-page-750x350.jpg
  • assets/img/placeholders/placeholder-page-general.jpg
  • assets/img/placeholders/placeholder-post-1920x600.jpg
  • assets/img/placeholders/placeholder-post-350x350.jpg
  • assets/img/placeholders/placeholder-post-360x168.jpg
  • assets/img/placeholders/placeholder-post-750x350.jpg
  • assets/img/placeholders/placeholder-review-1920x600.jpg
  • assets/img/placeholders/placeholder-review-350x350.jpg
  • assets/img/placeholders/placeholder-review-360x168.jpg
  • assets/img/placeholders/placeholder-review-750x350.jpg
  • assets/img/placeholders/placeholder-special-1920x600.jpg
  • assets/img/placeholders/placeholder-special-350x350.jpg
  • assets/img/placeholders/placeholder-special-360x168.jpg
  • assets/img/placeholders/placeholder-special-750x350.jpg
  • assets/img/placeholders/placeholder-team-1920x600.jpg
  • assets/img/placeholders/placeholder-team-350x350.jpg
  • assets/img/placeholders/placeholder-team-360x168.jpg
  • assets/img/placeholders/placeholder-team-750x350.jpg
  • assets/img/placeholders/placeholder-tour-1920x600.jpg
  • assets/img/placeholders/placeholder-tour-350x350.jpg
  • assets/img/placeholders/placeholder-tour-360x168.jpg
  • assets/img/placeholders/placeholder-tour-750x350.jpg
  • assets/img/placeholders/placeholder-vehicle-1920x600.jpg
  • assets/img/placeholders/placeholder-vehicle-350x350.jpg
  • assets/img/placeholders/placeholder-vehicle-360x168.jpg
  • assets/img/placeholders/placeholder-vehicle-750x350.jpg
  • assets/img/placeholders/placeholder-video-1920x600.jpg
  • assets/img/placeholders/placeholder-video-350x350.jpg
  • assets/img/placeholders/placeholder-video-360x168.jpg
  • assets/img/placeholders/placeholder-video-750x350.jpg
  • assets/img/restaurants.png
Files not summarized due to errors (15)
  • assets/js/blocks/maps.js (nothing obtained from openai)
  • assets/css/scss/_maps.scss (nothing obtained from openai)
  • assets/js/blocks/general.js (nothing obtained from openai)
  • assets/js/src/maps.js (nothing obtained from openai)
  • assets/css/style.css (nothing obtained from openai)
  • includes/classes/legacy/class-maps.php (diff tokens exceeds limit)
  • assets/css/style.scss (nothing obtained from openai)
  • includes/classes/legacy/class-frontend.php (nothing obtained from openai)
  • changelog.md (nothing obtained from openai)
  • includes/template-tags/maps.php (diff tokens exceeds limit)
  • includes/classes/blocks/class-bindings.php (nothing obtained from openai)
  • includes/classes/blocks/class-registration.php (nothing obtained from openai)
  • includes/classes/legacy/class-tour-operator.php (nothing obtained from openai)
  • includes/constants/settings-fields.php (nothing obtained from openai)
  • includes/template-tags/general.php (nothing obtained from openai)
Files not reviewed due to errors (14)
  • assets/css/scss/_maps.scss (no response)
  • assets/css/style.scss (no response)
  • assets/css/style.css (no response)
  • assets/js/blocks/general.js (no response)
  • assets/js/src/maps.js (no response)
  • assets/js/blocks/maps.js (no response)
  • includes/classes/blocks/class-registration.php (no response)
  • includes/classes/blocks/class-bindings.php (no response)
  • includes/classes/legacy/class-frontend.php (no response)
  • changelog.md (no response)
  • includes/classes/legacy/class-tour-operator.php (no response)
  • includes/constants/settings-fields.php (no response)
  • includes/template-tags/general.php (no response)
  • includes/template-tags/maps.php (no response)
Files skipped from review due to trivial changes (1)
  • includes/classes/legacy/class-maps.php (diff too large)
Review comments generated (0)
  • Review: 0
  • LGTM: 0

Tips

Chat with Image description CodeRabbit Bot (@coderabbitai)

  • Reply on review comments left by this bot to ask follow-up questions. A review comment is a comment on a diff or a file.
  • Invite the bot into a review comment chain by tagging @coderabbitai in a reply.

Code suggestions

  • The bot may make code suggestions, but please review them carefully before committing since the line number ranges may be misaligned.
  • You can edit the comment made by the bot and manually tweak the suggestion if it is slightly off.

Pausing incremental reviews

  • Add @coderabbitai: ignore anywhere in the PR description to pause further reviews from the bot.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Type] Enhancement A suggestion for improvement
Projects
Status: ✅ Done
Development

Successfully merging this pull request may close these issues.

2 participants